﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Group.aspx.cs" Inherits="demo.Pages.Group" %>

<%@ Register Assembly="Water" Namespace="Water.Web.Controls" TagPrefix="page" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <page:ObjectDataSource ID="ObjectDataSource1" runat="server" TypeName="demo.Objects.BLL.Employees" CanSelect="true" EnablePaging="true" CanUpdate="true">
        </page:ObjectDataSource>
        <br />
        <page:ListView ID="ListView1" runat="server" DataSourceID="ObjectDataSource1" GroupItemCount="5" AutoQuery="true" IsCallBack="false">
            <LayoutTemplate>
                <table width="100%">
                    <asp:PlaceHolder ID="groupPlaceholder" runat="server" />
                </table>
            </LayoutTemplate>
            <GroupTemplate>
                <tr>
                    <asp:PlaceHolder ID="itemPlaceholder" runat="server" />
                </tr>
            </GroupTemplate>
            <ItemTemplate>
                <td valign="top">
                    <page:Container ID="Container1" runat="server" TitleText='<%# Eval("firstname")%>' PackageType="Div" DataKeyNames="id" DataSourceID="ObjectDataSource1" ViewMode="Item" DefaultMode="Item">
                        <ItemTemplate>
                            <page:Label ID="Label1" runat="server" Text='<%# Eval("id") %>' Prompt="employees.id"></page:Label>
                            <page:Label ID="Label2" runat="server" Text='<%# Eval("firstname") %>' Prompt="employees.firstname"></page:Label>
                            <page:Label ID="Label3" runat="server" Text='<%# Eval("lastname") %>' Prompt="employees.lastname"></page:Label>
                            <page:Label ID="Label4" runat="server" Text='<%# Eval("email") %>' Prompt="employees.email"></page:Label>
                            <page:Label ID="Label5" runat="server" Text='<%# Eval("hiredate","{0:yyyy-MM-dd}") %>' Prompt="employees.hiredate"></page:Label>
                        </ItemTemplate>
                        <EditTemplate>
                            <page:Label ID="Label1" runat="server" Text='<%#Bind("id") %>' Prompt="employees.id"></page:Label>
                            <page:TextBox ID="TextBox1" runat="server" Text='<%#Bind("firstname") %>' Prompt="employees.firstname"></page:TextBox>
                            <page:TextBox ID="TextBox2" runat="server" Text='<%#Bind("lastname") %>' Prompt="employees.lastname"></page:TextBox>
                            <page:TextBox ID="TextBox3" runat="server" Text='<%#Bind("email") %>' Prompt="employees.email"></page:TextBox>
                            <page:TextBox ID="TextBox4" runat="server" Text='<%#Bind("hiredate","{0:yyyy-MM-dd}") %>' Prompt="employees.hiredate"></page:TextBox>
                        </EditTemplate>
                    </page:Container>
                </td>
            </ItemTemplate>
        </page:ListView>
        <page:DataPager ID="dp1" runat="server" PageSize="20" PagedControlID="ListView1" QueryTarget="ListView1" IsCallBack="false" />
    </div>
    </form>
</body>
</html>
